#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

void solve(){
    int n;
    cin>>n;
    vector<int> a(n);
    unordered_map<int,int> mp;
    int mn=0x3f3f3f3f,mx=-1;
    for(int i=0;i<n;i++){
        cin>>a[i];
        mp[a[i]]++;
        mx=max(mx,a[i]);
        if(a[i]!=-1)mn=min(mn,a[i]);
    }
    int temp=mx-mn;
    if(mn==0x3f3f3f3f&&mx==-1){
        cout<<"Yes"<<'\n';
        return;
    }
    if(temp==0&&mp[0]==0){
        cout<<"Yes"<<'\n';
        return;
    }
    int res=0;
    while(mp[res])res++;
    if(mp[-1]==0){
        if(temp!=res){
            cout<<"NO"<<'\n';
            return;
        }else{
            cout<<"YES"<<'\n';
            return;
        }
    }
    else{
        int res1=res;
        res++;
        while(mp[res])res++;
        if(temp!=res&&temp!=res1){
            cout<<"NO"<<'\n';
            return;
        }else{
            cout<<"YES"<<'\n';
            return;
        }
    }
}

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    int t=1;
    cin>>t;
    while(t--){
        solve();
    }
    return 0;
}